//定义store
import { defineStore } from "pinia";
import { ref } from 'vue';
export const useUserInfoStore = defineStore('userInfo', () => {
    const info = ref({})

    const setUserInfo = (userInfoData) => {
        info.value = userInfoData
    }
    const removeUserInfo = () => {
        userInfo.value = {}
    }
    return {
        info,
        setUserInfo,
        removeUserInfo
    }

},
    //参数持久化 刷新token不消失
    {
        persist: true
    }
);